var data1;
var data2;
var data3;
var c;
option();

function option() {
    $.ajax({
        type: "POST", //请求方式
        url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoCountRate", //请求的url地址
        data: {},
        async: false,
        success: function (data) { //如果发送成功
            data1 = data.data.list1;
            data2 = data.data.list2;
            data3 = data.data.list3;
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.log(XMLHttpRequest);
            console.log(textStatus);
            console.log(errorThrown);
        }
    });
}

/*发送邀请情况*/
// 基于准备好的dom，初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
//指定图表的配置项和数据
var option = {
    title: {
        text: '发送邀请情况',
        x: 'center'
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        data: ['已邀请', '未邀请', '邀请失败']
    },
    series: [
        {
            name: '',
            type: 'pie',
            radius: '55%',
            center: ['50%', '60%'],
            data: data1
            /*                [
                            {value: 310, name: '邀请失败'},
                            {value: 234, name: '未邀请'},
                            {value: 1548, name: '已邀请'}
                        ]*/,
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
/*参会人员情况*/
var myChart = echarts.init(document.getElementById('main2'));
var option = {
    title: {
        text: '参会人员情况',
        x: 'center'
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        data: ['不参会', '参会']
    },
    series: [
        {
            name: '',
            type: 'pie',
            radius: '55%',
            center: ['50%', '60%'],
            data: data2 /*[
                {value: 234, name: '不参会'},
                {value: 1548, name: '参会'}
            ]*/,
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
myChart.setOption(option);
/*出席人员情况*/
var myChart = echarts.init(document.getElementById('main3'));
var option = {
    title: {
        text: '出席人员情况',
        x: 'center'
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        data: ['已签到', '未签到']
    },
    series: [
        {
            name: '',
            type: 'pie',
            radius: '55%',
            center: ['50%', '60%'],
            data: data3 /*[
                {value: 234, name: '未签到'},
                {value: 1548, name: '已签到'}
            ]*/,
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
myChart.setOption(option);

/*发送邀请情况*/
send();
function send(obj) {
    $.ajax({
        type: "POST", //请求方式
        url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByStatus", //请求的url地址
        data: {
            'pageNum': c
        },
        success: function (data) {
            var Khdata0 = data.data;
            if (Khdata0 != null && Khdata0 != "") {
                var nihai = Khdata0.pageNum;
                var zong = Khdata0.pages;
                var data = Khdata0.list;
                var html;
                for (var i = 0; i < data.length; i++) {
                    var reply = data[i];
                    var statu = reply.status;
                    if (statu == 0) {
                        statu = "未邀请"
                    } else if (statu == 1) {
                        statu = "已邀请"
                    } else if (statu == 2) {
                        statu = "邀请失败"
                    }

                    var preheat_email = reply.preheat_email;
                    if (preheat_email == 0) {
                        preheat_email = "未发送"
                    } else if (preheat_email == 1) {
                        preheat_email = "已发送"
                    } else if (preheat_email == 2) {
                        preheat_email = "发送失败"
                    }

                    html += "<tr>" +
                        "<td>" + reply.username + "</td>" +
                        "<td>" + reply.company + "</td>" +
                        "<td>" + reply.phone + "</td>" +
                        "<td>" + reply.email + "</td>";
                    var html1;
                    var html2;
                    if (statu == "未邀请") {
                        html1 = "<td style=\"color: blue\">" + statu + "</td>";
                        html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                    } else if (statu == "已邀请") {
                        html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>";
                        html2 = "<td>" + "" + "</td>" + "</tr>"
                    } else if (statu == "邀请失败") {
                        html1 = "<td style=\"color: red\">" + statu + "</td>";
                        html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                    }
                    ;
                    html += html1;
                    html += html2;

                    var htmls = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"append(this)\">" + "上一页" + "</button>" +
                        "<input id=\"jiazai\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"jiazai2\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"minus(this)\">" + "下一页" + "</button>";
                }
                $(".tby").html(html); //在html页面的标签里显示html内容
                $(".div").html(htmls);

            }

        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.log(XMLHttpRequest);
            console.log(textStatus);
            console.log(errorThrown);
        }
    });
}

/*名字*/
function name(obj) {
    var nameSeek = $(".nameSeek").val().toLowerCase();
    console.log(nameSeek);
    if (nameSeek == "") {
        alert("查询的内容不能为空！")
        $(".tby").html("");
    } else if (nameSeek != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByUserName",//http://meetings.huimeihealth.com.cn/wxx
            data: {
                "username": nameSeek,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var list = data.list;
                if (list.length != 0) {
                    var html;
                    for (var i = 0; i < list.length; i++) {
                        var reply = list[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未邀请"
                        } else if (statu == 1) {
                            statu = "已邀请"
                        } else if (statu == 2) {
                            statu = "邀请失败"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        var html2;
                        if (statu == "未邀请") {
                            html1 = "<td style=\"color: blue\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        } else if (statu == "已邀请") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>";
                            html2 = "<td>" + "" + "</td>" + "</tr>"
                        } else if (statu == "邀请失败") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        }
                        ;
                        html += html1;
                        html += html2;
                    }
                    var htmls = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below(this)\">" + "下一页" + "</button>";
                    $(".tby").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls);
                } else {
                    $(".tby").html("");
                    $(".div").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*公司*/
function company(obj) {
    var companySeek = $(".companySeek").val().toLowerCase();
    console.log(companySeek);
    if (companySeek == "") {
        alert("查询的内容不能为空！")
    } else if (companySeek != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByCompany",
            data: {
                "company": companySeek,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未邀请"
                        } else if (statu == 1) {
                            statu = "已邀请"
                        } else if (statu == 2) {
                            statu = "邀请失败"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        var html2;
                        if (statu == "未邀请") {
                            html1 = "<td style=\"color: blue\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        } else if (statu == "已邀请") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>";
                            html2 = "<td>" + "" + "</td>" + "</tr>"
                        } else if (statu == "邀请失败") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        }
                        ;
                        html += html1;
                        html += html2;
                        var htmls = "<button style='background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius:5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"up1(this)\">" + "上一页" + "</button>" +
                            "<input id=\"present1\" type=\"hidden\" value=" + nihai + ">" +
                            "<input id=\"pages1\" type=\"hidden\" value=" + zong + ">" +
                            "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"below1(this)\">" + "下一页" + "</button>";
                    }
                    $(".tby").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls);
                } else {
                    $(".tby").html("");
                    $(".div").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*手机*/
function cellphone(obj) {
    var cellphoneSeek = $(".cellphoneSeek").val().toLowerCase();
    console.log(cellphoneSeek);
    if (cellphoneSeek == "") {
        alert("查询的内容不能为空！")
    } else if (cellphoneSeek != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByPhone",
            data: {"phone": cellphoneSeek,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未邀请"
                        } else if (statu == 1) {
                            statu = "已邀请"
                        } else if (statu == 2) {
                            statu = "邀请失败"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        var html2;
                        if (statu == "未邀请") {
                            html1 = "<td style=\"color: blue\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        } else if (statu == "已邀请") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>";
                            html2 = "<td>" + "" + "</td>" + "</tr>"
                        } else if (statu == "邀请失败") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        }
                        ;
                        html += html1;
                        html += html2;
                        var htmls = "<button style='background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius:5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"up2(this)\">" + "上一页" + "</button>" +
                            "<input id=\"present2\" type=\"hidden\" value=" + nihai + ">" +
                            "<input id=\"pages2\" type=\"hidden\" value=" + zong + ">" +
                            "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"below2(this)\">" + "下一页" + "</button>";
                    }
                    $(".tby").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls);
                } else {
                    $(".tby").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*邮箱*/
function email(obj) {
    var emailSeek1 = $(".emailSeek1").val().toLowerCase();
    console.log(emailSeek1);
    if (emailSeek1 == "") {
        alert("查询的内容不能为空！")
    } else if (emailSeek1 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByEmail",
            data: {"email": emailSeek1,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未邀请"
                        } else if (statu == 1) {
                            statu = "已邀请"
                        } else if (statu == 2) {
                            statu = "邀请失败"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        var html2;
                        if (statu == "未邀请") {
                            html1 = "<td style=\"color: blue\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        } else if (statu == "已邀请") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>";
                            html2 = "<td>" + "" + "</td>" + "</tr>"
                        } else if (statu == "邀请失败") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>";
                            html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        }
                        ;
                        html += html1;
                        html += html2;
                        var htmls = "<button style='background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius:5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"up3(this)\">" + "上一页" + "</button>" +
                            "<input id=\"present3\" type=\"hidden\" value=" + nihai + ">" +
                            "<input id=\"pages3\" type=\"hidden\" value=" + zong + ">" +
                            "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"below3(this)\">" + "下一页" + "</button>";
                    }
                    $(".tby").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls);
                } else {
                    $(".tby").html("");
                    $(".div").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*发送邮件*/
function sends(obj) {
    /*获取email*/
    var sender = $(obj).parent().prev().prev().html();
    /*获取name*/
    var sender1 = $(obj).parent().prev().prev().prev().prev().prev().html();
    if (sender1.length < 1 || sender.length < 1) {
        alert("姓名和邮箱不能为空！")
    } else {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/email/sendEmail",
            data: {
                "name": sender1,
                "to": sender,
            },
            success: function (date) {
                console.log("发送成功！");
                location.reload(send(obj));
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            },
        });
    }
}

/*是否发送邀请*/
function no(obj) {
    if ($('.select').val() == 0) {
        send();
    }
    if ($('.select').val() == 1) {
        $.ajax({
            type: "POST", //请求方式
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByStatus1", //请求的url地址
            data: {
                'pageNum': c
            },
            success: function (data) { //如果发送成功

                var nihai = data.data.pageNum;
                var zong = data.data.pages;

                var data = data.data.list;
                var html;
                for (var i = 0; i < data.length; i++) {
                    var reply = data[i];
                    var statu = reply.status;
                    if (statu == 0) {
                        statu = "未邀请"
                    } else if (statu == 1) {
                        statu = "已邀请"
                    } else if (statu == 2) {
                        statu = "邀请失败"
                    }
                    html += "<tr>" +
                        "<td>" + reply.username + "</td>" +
                        "<td>" + reply.company + "</td>" +
                        "<td>" + reply.phone + "</td>" +
                        "<td>" + reply.email + "</td>";
                    var html1;
                    var html2;
                    if (statu == "未邀请") {
                        html1 = "<td style=\"color: blue\">" + statu + "</td>";
                        html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                    } else if (statu == "已邀请") {
                        html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>";
                        html2 = "<td>" + "" + "</td>" + "</tr>"
                    } else if (statu == "邀请失败") {
                        html1 = "<td style=\"color: red\">" + statu + "</td>";
                        html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                    }
                    ;
                    html += html1;
                    html += html2;
                    var htmls = "<button style='     background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"append3(this)\">" + "上一页" + "</button>" +
                        "<input id=\"jiazai\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"jiazai2\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"minus3(this)\">" + "下一页" + "</button>";
                }

                $(".tby").html(html); //在html页面的标签里显示html内容
                $(".div").html(htmls);

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
    if ($('.select').val() == 2) {
        $.ajax({
            type: "POST", //请求方式
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByStatus2", //请求的url地址
            data: {
                'pageNum': c
            },
            success: function (data) { //如果发送成功

                var nihai = data.data.pageNum;
                var zong = data.data.pages;

                var data = data.data.list;
                var html;
                for (var i = 0; i < data.length; i++) {
                    var reply = data[i];
                    var statu = reply.status;
                    if (statu == 0) {
                        statu = "未邀请"
                    } else if (statu == 1) {
                        statu = "已邀请"
                    } else if (statu == 2) {
                        statu = "邀请失败"
                    }
                    html += "<tr>" +
                        "<td>" + reply.username + "</td>" +
                        "<td>" + reply.company + "</td>" +
                        "<td>" + reply.phone + "</td>" +
                        "<td>" + reply.email + "</td>";
                    var html1;
                    if (statu == "未邀请") {
                        html1 = "<td style=\"color: blue\">" + statu + "</td>"
                    } else if (statu == "已邀请") {
                        html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                    } else if (statu == "邀请失败") {
                        html1 = "<td style=\"color: red\">" + statu + "</td>"
                    }
                    ;
                    var html2 = "<td>" + "</tr>";
                    html += html1;
                    html += html2;
                    var htmls = "<button style='     background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"append4(this)\">" + "上一页" + "</button>" +
                        "<input id=\"jiazai\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"jiazai2\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"minus4(this)\">" + "下一页" + "</button>";
                }
                $(".tby").html(html); //在html页面的标签里显示html内容
                $(".div").html(htmls);

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
    if ($('.select').val() == 3) {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByStatus3",
            data: {
                'pageNum': c
            },
            success: function (data) {
                var data = data.data;
                console.log(data);
                if(data.length != 0){
                    var nihai = data.pageNum;
                    var zong = data.pages;
                    var data = data.list;
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未邀请"
                        } else if (statu == 1) {
                            statu = "已邀请"
                        } else if (statu == 2) {
                            statu = "邀请失败"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (statu == "未邀请") {
                            html1 = "<td style=\"color: blue\">" + statu + "</td>"
                        } else if (statu == "已邀请") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        } else if (statu == "邀请失败") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        }
                        var html2 = "<td>" + "<button onclick=\"sends(this)\" class=\"btn btn-info btn-xs\">" + "发送" + "</button>" + "</td>" + "</tr>"
                        html += html1;
                        html += html2;
                        var htmls = "<button style='     background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius:5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"append5(this)\">" + "上一页" + "</button>" +
                            "<input id=\"jiazai\" type=\"hidden\" value=" + nihai + ">" +
                            "<input id=\"jiazai2\" type=\"hidden\" value=" + zong + ">" +
                            "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px  32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"minus5(this)\">" + "下一页" + "</button>";
                    }

                    $(".tby").html(html);
                    $(".div").html(htmls);
                } else {
                    $(".tby").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*参会人员情况*/
function join(obj) {
    $.ajax({
        type: "POST", //请求方式
        url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsAttend", //请求的url地址
        data: {
            'pageNum': c
        },
        success: function (data) { //如果发送成功
            var Khdata = data.data;
            if (Khdata != null && Khdata != "") {
                var nihai1 = Khdata.pageNum;
                var zong1 = Khdata.pages;
                var data = Khdata.list;
                var html;
                for (var i = 0; i < data.length; i++) {
                    var reply = data[i];
                    var statu = reply.status;
                    if (statu == 0) {
                        statu = "未发送"
                    } else if (statu == 1) {
                        statu = "已发送"
                    }
                    var Join = reply.isJoin;
                    if (Join == 0) {
                        Join = "否"
                    } else if (Join == 1) {
                        Join = "是"
                    }
                    html += "<tr>" +
                        "<td>" + reply.username + "</td>" +
                        "<td>" + reply.company + "</td>" +
                        "<td>" + reply.phone + "</td>" +
                        "<td>" + reply.email + "</td>";
                    var html1;
                    if (statu == "未发送") {
                        html1 = "<td style=\"color: red\">" + statu + "</td>"
                    } else if (statu == "已发送") {
                        html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                    }
                    var html2;
                    if (Join == "否") {
                        html2 = "<td style=\"color: red\">" + Join + "</td>"
                    } else if (Join = "是") {
                        html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                    }
                    var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                    html += html1;
                    html += html2;
                    html += html3;
                    var htmls1 = "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px 32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"append1(this)\">" + "上一页" + "</button>" +
                        "<input id=\"jiazai1\" type=\"hidden\" value=" + nihai1 + ">" +
                        "<input id=\"jiazai3\" type=\"hidden\" value=" + zong1 + ">" +
                        "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px 32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"minus1(this)\">" + "下一页" + "</button>";
                }

                $(".tby2").html(html); //在html页面的标签里显示html内容
                $(".div").html(htmls1);
            }

        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.log(XMLHttpRequest);
            console.log(textStatus);
            console.log(errorThrown);
        }
    });
}

/*名字*/
function name2(obj) {
    var nameSeek2 = $(".nameSeek2").val().toLowerCase();
    console.log(nameSeek2);
    if (nameSeek2 == "") {
        $(".tby2").html("");
    } else if (nameSeek2 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsAttendAndUserName",
            data: {
                "username": nameSeek2,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未发送"
                        } else if (statu == 1) {
                            statu = "已发送"
                        }
                        var Join = reply.isJoin;
                        if (Join == 0) {
                            Join = "否"
                        } else if (Join == 1) {
                            Join = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";

                        var html1;
                        if (statu == "未发送") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        } else if (statu == "已发送") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        }
                        var html2;
                        if (Join == "否") {
                            html2 = "<td style=\"color: red\">" + Join + "</td>"
                        } else if (Join = "是") {
                            html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                        }
                        var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        html += html3;
                    }
                    var htmls1 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up4(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present4\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages4\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below4(this)\">" + "下一页" + "</button>";

                    $(".tby2").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls1);
                } else {
                    $(".tby2").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*公司*/
function company2(obj) {
    var companySeek2 = $(".companySeek2").val().toLowerCase();
    console.log(companySeek2);
    if (companySeek2 == "") {
        alert("查询的内容不能为空！")
    } else if (companySeek2 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsAttendAndCompany",
            data: {
                "company": companySeek2,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未发送"
                        } else if (statu == 1) {
                            statu = "已发送"
                        }
                        var Join = reply.isJoin;
                        if (Join == 0) {
                            Join = "否"
                        } else if (Join == 1) {
                            Join = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (statu == "未发送") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        } else if (statu == "已发送") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        }
                        var html2;
                        if (Join == "否") {
                            html2 = "<td style=\"color: red\">" + Join + "</td>"
                        } else if (Join = "是") {
                            html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                        }
                        var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        html += html3;
                    }
                    var htmls1 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up5(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present5\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages5\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below5(this)\">" + "下一页" + "</button>";

                    $(".tby2").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls1);
                } else {
                    $(".tby2").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*手机*/
function cellphone2(obj) {
    var cellphoneSeek2 = $(".cellphoneSeek2").val().toLowerCase();
    console.log(cellphoneSeek2);
    if (cellphoneSeek2 == "") {
        alert("查询的内容不能为空！")
    } else if (cellphoneSeek2 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsAttendAndPhone",
            data: {
                "phone": cellphoneSeek2,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未发送"
                        } else if (statu == 1) {
                            statu = "已发送"
                        }
                        var Join = reply.isJoin;
                        if (Join == 0) {
                            Join = "否"
                        } else if (Join == 1) {
                            Join = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (statu == "未发送") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        } else if (statu == "已发送") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        }
                        var html2;
                        if (Join == "否") {
                            html2 = "<td style=\"color: red\">" + Join + "</td>"
                        } else if (Join = "是") {
                            html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                        }
                        var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        html += html3;
                    }
                    var htmls1 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up6(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present6\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages6\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below6(this)\">" + "下一页" + "</button>";

                    $(".tby2").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls1);
                } else {
                    $(".tby2").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*邮箱*/
function email2(obj) {
    var emailSeek2 = $(".emailSeek2").val().toLowerCase();
    console.log(emailSeek2);
    if (emailSeek2 == "") {
        alert("查询的内容不能为空！")
    } else if (emailSeek2 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsAttendAndEmail",
            data: {
                "email": emailSeek2,
                'pageNum': c
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未发送"
                        } else if (statu == 1) {
                            statu = "已发送"
                        }
                        var Join = reply.isJoin;
                        if (Join == 0) {
                            Join = "否"
                        } else if (Join == 1) {
                            Join = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (statu == "未发送") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        } else if (statu == "已发送") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        }
                        var html2;
                        if (Join == "否") {
                            html2 = "<td style=\"color: red\">" + Join + "</td>"
                        } else if (Join = "是") {
                            html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                        }
                        var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        html += html3;
                    }
                    var htmls1 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up7(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present7\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages7\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below7(this)\">" + "下一页" + "</button>";

                    $(".tby2").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls1);
                } else {
                    $(".tby2").html("");
                    $(".div").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*是否参会*/
function no2(obj) {
    if ($('.select2').val() == 0){
        join(obj)
    }
    if ($('.select2').val() == 1) {
        $.ajax({
            type: "POST", //请求方式
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getJoinIsNot", //请求的url地址
            data: {
                'pageNum': c
            },
            success: function (data) { //如果发送成功
                var Khdata = data.data;
                if (Khdata != null && Khdata != "") {
                    var nihai1 = Khdata.pageNum;
                    var zong1 = Khdata.pages;
                    var data = Khdata.list;
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未发送"
                        } else if (statu == 1) {
                            statu = "已发送"
                        }
                        var Join = reply.isJoin;
                        if (Join == 0) {
                            Join = "否"
                        } else if (Join == 1) {
                            Join = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (statu == "未发送") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        } else if (statu == "已发送") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        }
                        var html2;
                        if (Join == "否") {
                            html2 = "<td style=\"color: red\">" + Join + "</td>"
                        } else if (Join = "是") {
                            html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                        }
                        var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        html += html3;
                        var htmls1 = "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px 32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"append6(this)\">" + "上一页" + "</button>" +
                            "<input id=\"jiazai1\" type=\"hidden\" value=" + nihai1 + ">" +
                            "<input id=\"jiazai3\" type=\"hidden\" value=" + zong1 + ">" +
                            "<button style='background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px 32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"minus6(this)\">" + "下一页" + "</button>";
                    }
                    $(".tby2").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls1);
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
    if ($('.select2').val() == 2) {
        $.ajax({
            type: "POST", //请求方式
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getJoinIs", //请求的url地址
            data: {
                'pageNum': c
            },
            success: function (data) { //如果发送成功
                var Khdata = data.data;
                if (Khdata != null && Khdata != "") {
                    var nihai1 = Khdata.pageNum;
                    var zong1 = Khdata.pages;

                    var data = Khdata.list;
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var statu = reply.status;
                        if (statu == 0) {
                            statu = "未发送"
                        } else if (statu == 1) {
                            statu = "已发送"
                        }
                        var Join = reply.isJoin;
                        if (Join == 0) {
                            Join = "否"
                        } else if (Join == 1) {
                            Join = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (statu == "未发送") {
                            html1 = "<td style=\"color: red\">" + statu + "</td>"
                        } else if (statu == "已发送") {
                            html1 = "<td style=\"color: #1dbc20\">" + statu + "</td>"
                        }
                        var html2;
                        if (Join == "否") {
                            html2 = "<td style=\"color: red\">" + Join + "</td>"
                        } else if (Join = "是") {
                            html2 = "<td style=\"color: #1dbc20\">" + Join + "</td>"
                        }
                        var html3 = "<td>" + reply.remark + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        html += html3;
                    }

                    var htmls1 = "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px 32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"append7(this)\">" + "上一页" + "</button>" +
                        "<input id=\"jiazai1\" type=\"hidden\" value=" + nihai1 + ">" +
                        "<input id=\"jiazai3\" type=\"hidden\" value=" + zong1 + ">" +
                        "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px 32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"minus7(this)\">" + "下一页" + "</button>";

                    $(".tby2").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls1);
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*出席人员情况*/
function attend(obj) {
    $.ajax({
        type: "POST", //请求方式
        url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsJoin", //请求的url地址
        data: {
            'pageNum': c
        },
        success: function (data) { //如果发送成功
            var Khdata2 = data.data;
            if (Khdata2 != null && Khdata2 != "") {
                var nihai2 = Khdata2.pageNum;
                var zong2 = Khdata2.pages;
                var data = Khdata2.list;
                var html;
                for (var i = 0; i < data.length; i++) {
                    var reply = data[i];
                    var Attend = reply.isAttend;
                    if (Attend == 0) {
                        Attend = "否"
                    } else if (Attend == 1) {
                        Attend = "是";
                    }
                    html += "<tr>" +
                        "<td>" + reply.username + "</td>" +
                        "<td>" + reply.company + "</td>" +
                        "<td>" + reply.phone + "</td>" +
                        "<td>" + reply.email + "</td>";
                    var html1;
                    if (Attend == "否") {
                        html1 = "<td style=\"color:red\">" + Attend + "</td>";
                    } else if (Attend == "是") {
                        html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                    }
                    var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                    html += html1;
                    html += html2;
                    var htmls2 = "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px 32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"append2(this)\">" + "上一页" + "</button>" +
                        "<input id=\"jiazai2\" type=\"hidden\" value=" + nihai2 + ">" +
                        "<input id=\"jiazai4\" type=\"hidden\" value=" + zong2 + ">" +
                        "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px 32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"minus2(this)\">" + "下一页" + "</button>";
                }
                $(".tby3").html(html); //在html页面的标签里显示html内容
                $(".div").html(htmls2);
            }

        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.log(XMLHttpRequest);
            console.log(textStatus);
            console.log(errorThrown);
        }
    });
}

/*名字*/
function name1(obj) {
    var nameSeek1 = $(".nameSeek1").val().toLowerCase();
   /* var emailSeek1 = $(".emailSeek1").val().toLowerCase();*/
    console.log(nameSeek1);
    if (nameSeek1 == "") {
        alert("查询的内容不能为空！")
    } else if (nameSeek1 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsJoinAndUserName",
            data: {
                "username": nameSeek1,
                'pageNum': c
                /*"email":emailSeek1*/
            }, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var Attend = reply.isAttend;
                        if (Attend == 0) {
                            Attend = "否"
                        } else if (Attend == 1) {
                            Attend = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (Attend == "否") {
                            html1 = "<td style=\"color:red\">" + Attend + "</td>";
                        } else if (Attend == "是") {
                            html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                        }
                        var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                    }
                    var htmls2 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up8(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present8\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages8\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below8(this)\">" + "下一页" + "</button>";
                    $(".tby3").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls2);
                } else {
                    $(".tby3").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*公司*/
function company1(obj) {
    var companySeek1 = $(".companySeek1").val().toLowerCase();
    console.log(companySeek1);
    if (companySeek1 == "") {
        alert("查询的内容不能为空！")
    } else if (companySeek1 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsJoinAndCompany",
            data: {"company": companySeek1,
                'pageNum': c}, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var Attend = reply.isAttend;
                        if (Attend == 0) {
                            Attend = "否"
                        } else if (Attend == 1) {
                            Attend = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (Attend == "否") {
                            html1 = "<td style=\"color:red\">" + Attend + "</td>";
                        } else if (Attend == "是") {
                            html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                        }
                        var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                    }
                    var htmls2 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up9(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present9\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages9\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below9(this)\">" + "下一页" + "</button>";
                    $(".tby3").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls2);
                } else {
                    $(".tby3").html("");
                    $(".div").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*手机*/
function cellphone1(obj) {
    var cellphoneSeek1 = $(".cellphoneSeek1").val().toLowerCase();
    console.log(cellphoneSeek1);
    if (cellphoneSeek1 == "") {
        alert("查询的内容不能为空！")
    } else if (cellphoneSeek1 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsJoinAndPhone",
            data: {"phone": cellphoneSeek1,
                'pageNum': c}, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var Attend = reply.isAttend;
                        if (Attend == 0) {
                            Attend = "否"
                        } else if (Attend == 1) {
                            Attend = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (Attend == "否") {
                            html1 = "<td style=\"color:red\">" + Attend + "</td>";
                        } else if (Attend == "是") {
                            html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                        }
                        var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                    }
                    var htmls2 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up10(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present10\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages10\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below10(this)\">" + "下一页" + "</button>";
                    $(".tby3").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls2);
                } else {
                    $(".tby3").html("");
                    $(".div").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*邮箱*/
function email1(obj) {
    var emailSeek1 = $("#emailSeek1").val().toLowerCase();
    console.log(emailSeek1);
    if (emailSeek1 == "") {
        alert("查询的内容不能为空！")
    } else if (emailSeek1 != "") {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getInfoByIsAttendAndEmail",
            data: {"email": emailSeek1,
                'pageNum': c}, //参数值
            success: function (data) { //如果发送成功
                var data = data.data;
                var nihai = data.pageNum;
                var zong = data.pages;
                var data = data.list;
                if (data.length != 0) {
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var Attend = reply.isAttend;
                        if (Attend == 0) {
                            Attend = "否"
                        } else if (Attend == 1) {
                            Attend = "是"
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (Attend == "否") {
                            html1 = "<td style=\"color:red\">" + Attend + "</td>";
                        } else if (Attend == "是") {
                            html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                        }
                        var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                    }
                    var htmls2 = "<button style='background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-right: 70px;\n" +
                        "    border-radius:5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"up11(this)\">" + "上一页" + "</button>" +
                        "<input id=\"present11\" type=\"hidden\" value=" + nihai + ">" +
                        "<input id=\"pages11\" type=\"hidden\" value=" + zong + ">" +
                        "<button style='    background-color: #4CAF50;\n" +
                        "    border: none;\n" +
                        "    color: white;\n" +
                        "    margin-left: 70px;\n" +
                        "    border-radius: 5px;\n" +
                        "    padding: 10px  32px;\n" +
                        "    text-align: center;\n" +
                        "    text-decoration: none;\n" +
                        "    display: inline-block;\n" +
                        "    font-size: 16px;\n" +
                        "    cursor: pointer;' onclick=\"below11(this)\">" + "下一页" + "</button>";
                    $(".tby3").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls2);
                } else {
                    $(".tby3").html("");
                    $(".div").html("");
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }

}

/*是否签到*/
function no3(obj) {
    if ($('.select3').val() == 0){
        attend(obj)
    }
    if ($('.select3').val() == 1) {
        $.ajax({
            type: "POST", //请求方式
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getAttendIsNot", //请求的url地址
            data: {
                'pageNum': c
            },
            success: function (data) { //如果发送成功
                var Khdata2 = data.data;
                if (Khdata2 != null && Khdata2 != "") {
                    var nihai2 = Khdata2.pageNum;
                    var zong2 = Khdata2.pages;
                    var data = Khdata2.list;
                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var Attend = reply.isAttend;
                        if (Attend == 0) {
                            Attend = "否"
                        } else if (Attend == 1) {
                            Attend = "是";
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (Attend == "否") {
                            html1 = "<td style=\"color:red\">" + Attend + "</td>";
                        } else if (Attend == "是") {
                            html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                        }
                        var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        var htmls2 = "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px 32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"append8(this)\">" + "上一页" + "</button>" +
                            "<input id=\"jiazai2\" type=\"hidden\" value=" + nihai2 + ">" +
                            "<input id=\"jiazai4\" type=\"hidden\" value=" + zong2 + ">" +
                            "<button style='background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px 32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"minus8(this)\">" + "下一页" + "</button>";
                    }

                    $(".tby3").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls2);
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
    if ($('.select3').val() == 2) {
        $.ajax({
            type: "POST", //请求方式
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/getAttendIs", //请求的url地址
            data: {
                'pageNum': c
            },
            success: function (data) { //如果发送成功
                var Khdata2 = data.data;
                if (Khdata2 != null && Khdata2 != "") {
                    var nihai2 = Khdata2.pageNum;
                    var zong2 = Khdata2.pages;

                    var data = Khdata2.list;

                    var html;
                    for (var i = 0; i < data.length; i++) {
                        var reply = data[i];
                        var Attend = reply.isAttend;
                        if (Attend == 0) {
                            Attend = "否"
                        } else if (Attend == 1) {
                            Attend = "是";
                        }
                        html += "<tr>" +
                            "<td>" + reply.username + "</td>" +
                            "<td>" + reply.company + "</td>" +
                            "<td>" + reply.phone + "</td>" +
                            "<td>" + reply.email + "</td>";
                        var html1;
                        if (Attend == "否") {
                            html1 = "<td style=\"color:red\">" + Attend + "</td>";
                        } else if (Attend == "是") {
                            html1 = "<td style=\"color:#1dbc20\">" + Attend + "</td>";
                        }
                        var html2 = "<td>" + "<button class=\"btn btn-info btn-xs\">" + "签到" + "</button>" + "</td>" + "</tr>";
                        html += html1;
                        html += html2;
                        var htmls2 = "<button style='    background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-right: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px 32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"append9(this)\">" + "上一页" + "</button>" +
                            "<input id=\"jiazai2\" type=\"hidden\" value=" + nihai2 + ">" +
                            "<input id=\"jiazai4\" type=\"hidden\" value=" + zong2 + ">" +
                            "<button style='background-color: #4CAF50;\n" +
                            "    border: none;\n" +
                            "    color: white;\n" +
                            "    margin-left: 70px;\n" +
                            "    border-radius: 5px;\n" +
                            "    padding: 10px 32px;\n" +
                            "    text-align: center;\n" +
                            "    text-decoration: none;\n" +
                            "    display: inline-block;\n" +
                            "    font-size: 16px;\n" +
                            "    cursor: pointer;' onclick=\"minus9(this)\">" + "下一页" + "</button>";
                    }
                    $(".tby3").html(html); //在html页面的标签里显示html内容
                    $(".div").html(htmls2);
                } else {
                    $(".tby3").html("");
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*发送邀请情况*/
function append(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        send();
    }
}
function minus(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != b) {
        a++;
        c = a;
        send();
    }
}

/*否*/
function append3(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        no(obj);
    }
}
function minus3(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no(obj);
    }
}

/*是*/
function append4(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        no(obj);
    }
}
function minus4(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no(obj);
    }
}

/*失败*/
function append5(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        no(obj);
    }
}
function minus5(obj) {
    var a = $('#jiazai').val();//当前页
    var b = $('#jiazai2').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no(obj);
    }
}

/*名字*/
function up(obj) {
    var a = $('#present').val();//当前页
    var b = $('#pages').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        name(obj);
    }
}
function below(obj) {
    var a = $('#present').val();//当前页
    var b = $('#pages').val();//总页数
    if (a != b) {
        a++;
        c = a;
        name(obj);
    }
}

/*公司*/
function up1(obj) {
    var a = $('#present1').val();//当前页
    var b = $('#pages1').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        company(obj);
    }
}
function below1(obj) {
    var a = $('#present1').val();//当前页
    var b = $('#pages1').val();//总页数
    if (a != b) {
        a++;
        c = a;
        company(obj);
    }
}

/*手机*/
function up2(obj) {
    var a = $('#present2').val();//当前页
    var b = $('#pages2').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        cellphone(obj);
    }
}
function below2(obj) {
    var a = $('#present2').val();//当前页
    var b = $('#pages2').val();//总页数
    if (a != b) {
        a++;
        c = a;
        cellphone(obj);
    }
}

/*邮箱*/
function up3(obj) {
    var a = $('#present3').val();//当前页
    var b = $('#pages3').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        email(obj);
    }
}
function below3(obj) {
    var a = $('#present3').val();//当前页
    var b = $('#pages3').val();//总页数
    if (a != b) {
        a++;
        c = a;
        email(obj);
    }
}


/*参会人员情况*/
function append1(obj) {
    var a = $('#jiazai1').val();//当前页
    var b = $('#jiazai3').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        join(obj);
    }
}
function minus1(obj) {
    var a = $('#jiazai1').val();//当前页
    var b = $('#jiazai3').val();//总页数
    if (a != b) {
        a++;
        c = a;
        join(obj);
    }
}

/*否*/
function append6(obj) {
    var a = $('#jiazai1').val();//当前页
    var b = $('#jiazai3').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        no2(obj)
    }
}
function minus6(obj) {
    var a = $('#jiazai1').val();//当前页
    var b = $('#jiazai3').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no2(obj)
    }
}

/*是*/
function append7(obj) {
    var a = $('#jiazai1').val();//当前页
    var b = $('#jiazai3').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        no2(obj)
    }
}
function minus7(obj) {
    var a = $('#jiazai1').val();//当前页
    var b = $('#jiazai3').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no2(obj)
    }
}

/*出席人员情况*/
function append2(obj) {
    var a = $('#jiazai2').val();//当前页
    var b = $('#jiazai4').val();//总页数
    if (a != 1) {
        a--;
        c = a;

        attend(obj);
    }
}
function minus2(obj) {
    var a = $('#jiazai2').val();//当前页
    var b = $('#jiazai4').val();//总页数
    if (a != b) {
        a++;
        c = a;
        attend(obj);
    }
}

/*否*/
function append8(obj) {
    var a = $('#jiazai2').val();//当前页
    var b = $('#jiazai4').val();//总页数
    if (a != 1) {
        a--;
        c = a;

        no3(obj);
    }
}
function minus8(obj) {
    var a = $('#jiazai2').val();//当前页
    var b = $('#jiazai4').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no3(obj);
    }
}

/*是*/
function append9(obj) {
    var a = $('#jiazai2').val();//当前页
    var b = $('#jiazai4').val();//总页数
    if (a != 1) {
        a--;
        c = a;

        no3(obj);
    }
}
function minus9(obj) {
    var a = $('#jiazai2').val();//当前页
    var b = $('#jiazai4').val();//总页数
    if (a != b) {
        a++;
        c = a;
        no3(obj);
    }
}


/*名字*/
function up4(obj) {
    var a = $('#present4').val();//当前页
    var b = $('#pages4').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        name2(obj);
    }
}
function below4(obj) {
    var a = $('#present4').val();//当前页
    var b = $('#pages4').val();//总页数
    if (a != b) {
        a++;
        c = a;
        name2(obj);
    }
}

/*公司*/
function up5(obj) {
    var a = $('#present5').val();//当前页
    var b = $('#pages5').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        company2(obj);
    }
}
function below5(obj) {
    var a = $('#present5').val();//当前页
    var b = $('#pages5').val();//总页数
    if (a != b) {
        a++;
        c = a;
        company2(obj);
    }
}

/*手机*/
function up6(obj) {
    var a = $('#present6').val();//当前页
    var b = $('#pages6').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        cellphone2(obj);
    }
}
function below6(obj) {
    var a = $('#present6').val();//当前页
    var b = $('#pages6').val();//总页数
    if (a != b) {
        a++;
        c = a;
        cellphone2(obj);
    }
}

/*邮箱*/
function up7(obj) {
    var a = $('#present7').val();//当前页
    var b = $('#pages7').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        email2(obj);
    }
}
function below7(obj) {
    var a = $('#present7').val();//当前页
    var b = $('#pages7').val();//总页数
    if (a != b) {
        a++;
        c = a;
        email2(obj);
    }
}


/*出席人员情况*/
/*名字*/
function up8(obj) {
    var a = $('#present8').val();//当前页
    var b = $('#pages8').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        name1(obj);
    }
}
function below8(obj) {
    var a = $('#present8').val();//当前页
    var b = $('#pages8').val();//总页数
    if (a != b) {
        a++;
        c = a;
        name1(obj);
    }
}

/*公司*/
function up9(obj) {
    var a = $('#present9').val();//当前页
    var b = $('#pages9').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        company1(obj);
    }
}
function below9(obj) {
    var a = $('#present9').val();//当前页
    var b = $('#pages9').val();//总页数
    if (a != b) {
        a++;
        c = a;
        company1(obj);
    }
}

/*手机*/
function up10(obj) {
    var a = $('#present10').val();//当前页
    var b = $('#pages10').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        cellphone1(obj);
    }
}
function below10(obj) {
    var a = $('#present10').val();//当前页
    var b = $('#pages10').val();//总页数
    if (a != b) {
        a++;
        c = a;
        cellphone1(obj);
    }
}

/*邮箱*/
function up11(obj) {
    var a = $('#present11').val();//当前页
    var b = $('#pages11').val();//总页数
    if (a != 1) {
        a--;
        c = a;
        email1(obj);
    }
}
function below11(obj) {
    var a = $('#present11').val();//当前页
    var b = $('#pages11').val();//总页数
    if (a != b) {
        a++;
        c = a;
        email1(obj);
    }
}


/*微信*/
function present(obj) {
    var name = $('.name-a').val();
    var company = $('.company-a').val();
    var phone = $('.phone-a').val();
    var email = $('.mailbox-a').val();

    if (checkname(name) == true && checkcompany(company) == true && checkEmail(email) == true) {
        $.ajax({
            type: "POST",
            url: "http://meetings.huimeihealth.com.cn/wxx/userEmail/addUserEmailInfo",
            data: {
                'first_name': name,
                'company': company,
                'phone': phone,
                'email': email
            },
            success: function (data) {
                if(data.msg == "处理失败"){
                    alert(data.data);
                    $('.yard').val("")
                }else{

                    $('.yard').val(data.data);
                }


            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log(XMLHttpRequest);
                console.log(textStatus);
                console.log(errorThrown);
            }
        });
    }
}

/*姓名验证*/
function checkname(name) {
    if (name == "") {
        $('.name-b').text("");
        $('.name-b').text("名字不能为空");
        return false;
    } else {
        return true;
    }
}

/*公司验证*/
function checkcompany(company) {
    if (company == "") {
        $('.company-b').text("");
        $('.company-b').text("公司名不能为空");
        return false;
    } else {
        return true;
    }
}

/*邮箱验证*/
function checkEmail(email) {
    var re = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
    if (email == "") {
        $('.mailbox-b').text("");
        $('.mailbox-b').text("邮箱不能为空");
        return false;
    }
    if (re.test(email)) {
        return true;
    } else {
        $('.mailbox-b').text("");
        $('.mailbox-b').text("邮箱格式不正确");
        return false;
    }
}

/*手机号验证*/
/*function phones (phone){
    var reg =  /^1\d{10}$/;
    if(phone == ""){
        $(".phone-b").text("");
        $(".phone-b").text("手机号不可为空");
        return false;
    }
    if(reg.test(phone)){
        return true;
    }else{
        $(".phone-b").text("");
        $(".phone-b").text("手机号格式不正确");
        return false;
    }
}*/







